from django.urls import path,include
from rest_framework.routers import DefaultRouter
from .views import KDataViewSet

router = DefaultRouter()
router.register(r'kdata', KDataViewSet)

urlpatterns = [
    # # 获得所有记录
    # path('', include(router.urls)),
    path('data/', KDataViewSet.as_view({'get': 'get_data'})),
    path('data/v2/', KDataViewSet.as_view({'get': 'get_data_v2'}))
]